package com.yh.doing.state_pattern.demo;

/**
 * @program: design-patterns
 * @description:
 * @author: yangh0597@163.com
 * @date: 2022-11-27 21:32
 * @problem:
 **/
public class Context {
    private State stateA=new StateA();
    private State stateB=new StateB();
    private State current_state=stateA;

    public  void setStatue(State state){
        this.current_state=state;
    }

    public void handle(){
        this.current_state.handle();
    }


}
